package com.project.common.domain.entity;

import com.project.common.domain.po.BasePO;
import io.swagger.v3.oas.annotations.media.Schema;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import lombok.Data;


/**
 * @author: 陈刚
 * @blame:
 * @date: 2022/10/3 23:16
 **/
@Data
@MappedSuperclass
public class Role extends BasePO {

    @Schema(description = "岗位角色名称")
    @Column(columnDefinition = "varchar(32) DEFAULT NULL COMMENT '角色名称'")
    private String name;

    @Schema(description = "岗位角色KEY")
    @Column(columnDefinition = "varchar(32) DEFAULT NULL COMMENT '角色权限字符串'")
    private String roleKey;

    @Schema(description = "显示顺序")
    @Column(columnDefinition = "int DEFAULT 0 COMMENT '显示顺序'")
    private Integer sort;

    @Schema(description = "状态")
    @Column(columnDefinition = "tinyint(3) DEFAULT 1 COMMENT '1正常，2禁用'")
    private Integer status;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "上级岗位")
    @Column(columnDefinition = "bigint DEFAULT 0  COMMENT '父级ID'")
    private Long parentId;
}
